﻿namespace SuperStarRounds.DockingTasks
{
  using System;

  using Models;

  public partial class ContentConfiguration : BaseDockingTask
  {
    public ContentConfiguration()
    {
      InitializeComponent();
    }

    private void ContentConfiguration_Load(object sender, EventArgs e)
    {
      Base_Load();
    }

    private void ContentConfiguration_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
    {
      Base_FormClosing();
    }

    public override void LocaliseForm()
    {
      Text = Localize.CcFormTitle;
      contentOptionsInstruction.Text = Localize.CcInstructionsLabel;
      booksAllowed.Text = Localize.CcBooksAllowedLabel;
      classesAllowed.Text = Localize.CcClassesAllowedLabel;
    }

    public override void ResetContent(object sender, EventArgs e)
    {
      OwnerSuperStar.ResetContent(sender, e);
    }

    public ContentInclusions GetInclusionCheckState()
    {
      return new ContentInclusions
      {
        #region core rules
        IncludeCoreRules = incCoreRules.Checked,
        IncludeBarbarian = incBarbarian.Checked,
        IncludeBard = incBard.Checked,
        IncludeCleric = incCleric.Checked,
        IncludeDruid = incDruid.Checked,
        IncludeFighter = incFighter.Checked,
        IncludeMonk = incMonk.Checked,
        IncludePaladin = incPaladin.Checked,
        IncludeRanger = incRanger.Checked,
        IncludeRogue = incRogue.Checked,
        IncludeSorcerer = incSorcerer.Checked,
        IncludeWizard = incWizard.Checked,
        #endregion
        #region advanced player's guide
        IncludeAdvancedPlayersGuide = incAdvancedPlayersGuide.Checked,
        IncludeAlchemist = incAlchemist.Checked,
        IncludeAntiPaladin = incAntiPaladin.Checked,
        IncludeCavalier = incCavalier.Checked,
        IncludeInquisitor = incInquisitor.Checked,
        IncludeOracle = incOracle.Checked,
        IncludeSummoner = incSummoner.Checked,
        IncludeWitch = incWitch.Checked,
        #endregion
        #region advanced class guide
        IncludeAdvancedClassGuide = incAdvancedClassGuide.Checked,
        IncludeArcanist = incArcanist.Checked,
        IncludeBloodrager = incBloodrager.Checked,
        IncludeBrawler = incBrawler.Checked,
        IncludeHunter = incHunter.Checked,
        IncludeInvestigator = incInvestigator.Checked,
        IncludeShaman = incShaman.Checked,
        IncludeSkald = incSkald.Checked,
        IncludeSlayer = incSlayer.Checked,
        IncludeSwashbuckler = incSwashbuckler.Checked,
        IncludeWarpriest = incWarpriest.Checked,
        #endregion
        #region occult adventures
        IncludeOccultAdventures = incOccultAdventures.Checked,
        IncludeKineticist = incKineticist.Checked,
        IncludeMedium = incMedium.Checked,
        IncludeMesmerist = incMesmerist.Checked,
        IncludeOccultist = incOccultist.Checked,
        IncludePsychic = incPsychic.Checked,
        IncludeSpiritualist = incSpiritualist.Checked,
        #endregion
        #region ultimate combat
        IncludeUltimateCombat = incUltimateCombat.Checked,
        IncludeGunslinger = incGunslinger.Checked,
        IncludeNinja = incNinja.Checked,
        IncludeSamurai = incSamurai.Checked,
        #endregion
        #region ultimate magic
        IncludeUltimateMagic = incUltimateMagic.Checked,
        IncludeMagus = incMagus.Checked
        #endregion
      };
    }

    public void SetInclusionCheckState(ContentInclusions states)
    {
      #region core rules
      incCoreRules.Checked = states.IncludeCoreRules;
      incBarbarian.Checked = states.IncludeBarbarian;
      incBard.Checked = states.IncludeBard;
      incCleric.Checked = states.IncludeCleric;
      incDruid.Checked = states.IncludeDruid;
      incFighter.Checked = states.IncludeFighter;
      incMonk.Checked = states.IncludeMonk;
      incPaladin.Checked = states.IncludePaladin;
      incRanger.Checked = states.IncludeRanger;
      incRogue.Checked = states.IncludeRogue;
      incSorcerer.Checked = states.IncludeSorcerer;
      incWizard.Checked = states.IncludeWizard;
      #endregion
      #region advanced player's guide
      incAdvancedPlayersGuide.Checked = states.IncludeAdvancedPlayersGuide;
      incAlchemist.Checked = states.IncludeAlchemist;
      incAntiPaladin.Checked = states.IncludeAntiPaladin;
      incCavalier.Checked = states.IncludeCavalier;
      incInquisitor.Checked = states.IncludeInquisitor;
      incOracle.Checked = states.IncludeOracle;
      incSummoner.Checked = states.IncludeSummoner;
      incWitch.Checked = states.IncludeWitch;
      #endregion
      #region advanced class guide
      incAdvancedClassGuide.Checked = states.IncludeAdvancedClassGuide;
      incArcanist.Checked = states.IncludeArcanist;
      incBloodrager.Checked = states.IncludeBloodrager;
      incBrawler.Checked = states.IncludeBrawler;
      incHunter.Checked = states.IncludeHunter;
      incInvestigator.Checked = states.IncludeInvestigator;
      incShaman.Checked = states.IncludeShaman;
      incSkald.Checked = states.IncludeSkald;
      incSlayer.Checked = states.IncludeSlayer;
      incSwashbuckler.Checked = states.IncludeSwashbuckler;
      incWarpriest.Checked = states.IncludeWarpriest;
      #endregion
      #region occult adventures
      incOccultAdventures.Checked = states.IncludeOccultAdventures;
      incKineticist.Checked = states.IncludeKineticist;
      incMedium.Checked = states.IncludeMedium;
      incMesmerist.Checked = states.IncludeMesmerist;
      incOccultist.Checked = states.IncludeOccultist;
      incPsychic.Checked = states.IncludePsychic;
      incSpiritualist.Checked = states.IncludeSpiritualist;
      #endregion
      #region ultimate combat
      incUltimateCombat.Checked = states.IncludeUltimateCombat;
      incGunslinger.Checked = states.IncludeGunslinger;
      incNinja.Checked = states.IncludeNinja;
      incSamurai.Checked = states.IncludeSamurai;
      #endregion
      #region ultimate magic
      incUltimateMagic.Checked = states.IncludeUltimateMagic;
      incMagus.Checked = states.IncludeMagus;
      #endregion
    }
  }
}
